package com.keepmoving.web;

import com.keepmoving.po.Course;
import com.keepmoving.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author gyy
 * 课程控制器
 */
@Controller
public class CourseController {
    @Autowired
    CourseService courseService;
      @RequestMapping("/getcourse")
    public String findCourseAll(Model model){
          List<Course> courseList = courseService.findAll();
          model.addAttribute("courseList",courseList);
          return "adminCourseList";
      }

}
